package com.zmn.oms.third.taobao;

import com.zmn.common.constant.GlobalConsts;
import com.zmn.oms.common.constant.OrderConsts;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.third.base.util.ProductIdUtil;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

/**
 * 类描述：
 *
 * @author LiangHailong
 * @date 2019/06/15 19:21
 */
public final class TaobaoMapper {

    /**
     * 投诉问题映射表
     */
    public static final Map<String, RecourseQuestion> RECOURSE_QUESTION_MAP = new HashMap();

    /**
     * 淘宝商品ID-淘宝SKUID-啄木鸟产品ID
     */
    public static final Map<String, Map<String, ZmnProductMapping>> PRODUCT_ID_MAP = new HashMap();

    /* 投诉问题映射表-数据初始化 */
    static {
        // 服务类型：家装三年质保
        RECOURSE_QUESTION_MAP.put("051", new RecourseQuestion("051", "服务未完成", "家装三年质保"));
        RECOURSE_QUESTION_MAP.put("052", new RecourseQuestion("052", "质保方案不认可", "家装三年质保"));
        // 服务类型：以旧换新
        RECOURSE_QUESTION_MAP.put("061", new RecourseQuestion("061", "无人预约上门收件", "以旧换新"));
        RECOURSE_QUESTION_MAP.put("062", new RecourseQuestion("062", "未按预约时间上门", "以旧换新"));
        // 服务类型：家装预约安装
        RECOURSE_QUESTION_MAP.put("071", new RecourseQuestion("071", "无人预约安装", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("072", new RecourseQuestion("072", "未经允许更改上门时间", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("073", new RecourseQuestion("073", "未按约定时间上门", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("074", new RecourseQuestion("074", "取消安装/退安装费", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("075", new RecourseQuestion("075", "拒绝安装/安装服务未完成", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("076", new RecourseQuestion("076", "收取额外服务费用", "家装预约安装"));
        RECOURSE_QUESTION_MAP.put("077", new RecourseQuestion("077", "安装后有问题", "家装预约安装"));
        // 服务类型：家电预约安装
        RECOURSE_QUESTION_MAP.put("091", new RecourseQuestion("091", "未按时预约", "家电预约安装"));
        RECOURSE_QUESTION_MAP.put("092", new RecourseQuestion("092", "未经允许更改上门时间", "家电预约安装"));
        RECOURSE_QUESTION_MAP.put("093", new RecourseQuestion("093", "未按约定时间上门", "家电预约安装"));
        RECOURSE_QUESTION_MAP.put("094", new RecourseQuestion("094", "收取额外服务费用", "家电预约安装"));
        RECOURSE_QUESTION_MAP.put("095", new RecourseQuestion("095", "拒绝安装/安装服务未完成", "家电预约安装"));
        RECOURSE_QUESTION_MAP.put("096", new RecourseQuestion("096", "安装后有问题", "家电预约安装"));
        // 服务类型：家装送货入户
        RECOURSE_QUESTION_MAP.put("101", new RecourseQuestion("101", "货到物流需自提", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("102", new RecourseQuestion("102", "不提供搬楼", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("103", new RecourseQuestion("103", "收取服务费用", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("104", new RecourseQuestion("104", "取消服务/退服务费", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("105", new RecourseQuestion("105", "预约不及时/无人预约", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("106", new RecourseQuestion("106", "修改/确认上门时间", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("107", new RecourseQuestion("107", "未及时上门服务", "家装送货入户"));
        RECOURSE_QUESTION_MAP.put("108", new RecourseQuestion("108", "送装过程造成额外损失", "家装送货入户"));
        // 服务类型：家装送货入户并安装
        RECOURSE_QUESTION_MAP.put("111", new RecourseQuestion("111", "安装质量问题", "家装送货入户并安装"));
        RECOURSE_QUESTION_MAP.put("112", new RecourseQuestion("112", "无人预约安装", "家装送货入户并安装"));
        // 服务类型：电器延保服务（未上线）/ 手机碎屏服务（未上线）
        RECOURSE_QUESTION_MAP.put("113", new RecourseQuestion("113", "未按时预约", "电器延保服务/手机碎屏服务"));
        RECOURSE_QUESTION_MAP.put("114", new RecourseQuestion("114", "未按时上门", "电器延保服务/手机碎屏服务"));
        RECOURSE_QUESTION_MAP.put("115", new RecourseQuestion("115", "未完成维修", "电器延保服务/手机碎屏服务"));
        RECOURSE_QUESTION_MAP.put("116", new RecourseQuestion("116", "上门时间被更改", "电器延保服务/手机碎屏服务"));
        RECOURSE_QUESTION_MAP.put("117", new RecourseQuestion("117", "维修后仍有问题", "电器延保服务/手机碎屏服务"));
        // 服务类型：自营店-上门类（未上线）
        RECOURSE_QUESTION_MAP.put("118", new RecourseQuestion("118", "未按时上门", "自营店-上门类"));
        RECOURSE_QUESTION_MAP.put("119", new RecourseQuestion("119", "未按时完成服务", "自营店-上门类"));
        RECOURSE_QUESTION_MAP.put("120", new RecourseQuestion("120", "服务中造成额外损失", "自营店-上门类"));

        RECOURSE_QUESTION_MAP.put("125", new RecourseQuestion("125", "违规收渠额外服务费用", "勤鸽旗舰店（3C行业）"));
        RECOURSE_QUESTION_MAP.put("126", new RecourseQuestion("126", "服务态度不好", "勤鸽旗舰店（3C行业）"));
        RECOURSE_QUESTION_MAP.put("127", new RecourseQuestion("127", "拒绝服务/服务未完成", "勤鸽旗舰店（3C行业）"));
        RECOURSE_QUESTION_MAP.put("132", new RecourseQuestion("132", "无人预约", "勤鸽旗舰店（3C行业）"));
        RECOURSE_QUESTION_MAP.put("133", new RecourseQuestion("133", "联系不上服务商", "勤鸽旗舰店（3C行业）"));
        RECOURSE_QUESTION_MAP.put("134", new RecourseQuestion("134", "服务后有质量问题", "勤鸽旗舰店（3C行业）"));

    }

    /* 淘宝产品映射关系初始化 - 清洗 */
    static {
        Map<String, ZmnProductMapping> map = null;

        // 冰箱清洗
        map = new HashMap<>();
        map.put("3952708437845", new ZmnProductMapping(11235, 0, 579959758111L, 3952708437845L, "普通冰箱/（2门以下）"));
        map.put("3952708437846", new ZmnProductMapping(11238, 11500, 579959758111L, 3952708437846L, "对开门/多门冰箱"));
        map.put("4333576563711", new ZmnProductMapping(11237, 11500, 579959758111L, 4333576563711L, "三门冰箱"));
        PRODUCT_ID_MAP.put("579959758111", map);
        // 油烟机冲洗保养
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10076, 0, 579952754974L, 0L, "油烟机冲洗保养"));
        map.put("4497438406391", new ZmnProductMapping(10076, 0, 579952754974L, 4497438406391L, "油烟机-半拆清洗"));
        map.put("4497438406392", new ZmnProductMapping(10285, 0, 579952754974L, 4497438406392L, "油烟机-全拆洗清洗*1"));
        map.put("4582368186641", new ZmnProductMapping(10472, 0, 579952754974L, 4582368186641L, "油烟机*1（半拆）+燃气灶*1"));
        PRODUCT_ID_MAP.put("579952754974", map);
        // 洗衣机清洗保养
        map = new HashMap<>();
        map.put("4120848367321", new ZmnProductMapping(10036, 0, 579953142317L, 4120848367321L, "波轮半拆清洗"));
        map.put("4120848367322", new ZmnProductMapping(10760, 0, 579953142317L, 4120848367322L, "滚筒深度清洗"));
        map.put("4326090288882", new ZmnProductMapping(10711, 0, 579953142317L, 4326090288882L, "波轮全拆清洗"));
        PRODUCT_ID_MAP.put("579953142317", map);
        // 热水器清洗
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10062, 0, 579832485379L, 0L, "热水器清洗"));
        map.put("4564750095480", new ZmnProductMapping(10062, 0, 579832485379L, 4564750095480L, "热水器清洗"));
        PRODUCT_ID_MAP.put("579832485379", map);
        // 空调深度清洗
        map = new HashMap<>();
        map.put("3951210968584", new ZmnProductMapping(10010, 0, 579832577480L, 3951210968584L, "1台挂机"));
        map.put("3951210968585", new ZmnProductMapping(10470, 13500, 579832577480L, 3951210968585L, "2台挂机"));
        map.put("3951210968583", new ZmnProductMapping(11126, 19500, 579832577480L, 3951210968583L, "3台挂机"));
        map.put("4417621177413", new ZmnProductMapping(10010, 19500, 579832577480L, 4417621177413L, "空调挂机1台"));
        map.put("4417621177414", new ZmnProductMapping(10011, 19500, 579832577480L, 4417621177414L, "空调柜机1台"));
        map.put("4417621177412", new ZmnProductMapping(11612, 19500, 579832577480L, 4417621177412L, "空调挂机/柜机任洗2台"));
        map.put("4417621177415", new ZmnProductMapping(11613, 19500, 579832577480L, 4417621177415L, "空调挂机/柜机任洗3台"));
        map.put("4417621177410", new ZmnProductMapping(11614, 19500, 579832577480L, 4417621177410L, "空调挂机/柜机任洗4台"));
        map.put("4417621177411", new ZmnProductMapping(11615, 19500, 579832577480L, 4417621177411L, "空调挂机/柜机任洗5台"));
        PRODUCT_ID_MAP.put("579832577480", map);
        // 空调柜机深度清洗
        map = new HashMap<>();
        map.put("4122230551746", new ZmnProductMapping(10011, 0, 579960194697L, 4122230551746L, "1台柜机"));
        map.put("4122230551747", new ZmnProductMapping(10469, 0, 579960194697L, 4122230551747L, "1台柜机+1台挂机"));
        PRODUCT_ID_MAP.put("579960194697", map);
        // 空调-天花机-拆机清洗
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11155, 14500, 595510015494L, 0L, "1台天花机-拆机清洗"));
        PRODUCT_ID_MAP.put("595510015494", map);
        // 空调-中央空调拆洗内机
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10012, 0, 595332150035L, 0L, "1台中央空调拆洗内机"));
        map.put("4404912965053", new ZmnProductMapping(10012, 0, 595332150035L, 4404912965053L, "空调清洗-中央空调请洗服务（1风口）"));
        map.put("4410162120030", new ZmnProductMapping(11159, 0, 595332150035L, 4410162120030L, "空调清洗-中央空调请洗服务（3风口）-二室一厅"));
        map.put("4410162120029", new ZmnProductMapping(11160, 0, 595332150035L, 4410162120029L, "空调清洗-中央空调请洗服务（4风口）-三室一厅"));
        map.put("4410162120031", new ZmnProductMapping(11161, 0, 595332150035L, 4410162120031L, "空调清洗-中央空调请洗服务（5风口）-三室二厅"));
        PRODUCT_ID_MAP.put("595332150035", map);
        // 燃气灶清洗
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10071, 0, 595160729185L, 0L, "燃气灶清洗"));
        PRODUCT_ID_MAP.put("595160729185", map);
        // 微波炉清洗
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10100, 0, 595511259875L, 0L, "微波炉清洗"));
        PRODUCT_ID_MAP.put("595511259875", map);
        // 套餐清洗-空调
        map = new HashMap<>();
        map.put("4134430665598", new ZmnProductMapping(10469, 0, 594924756297L, 4134430665598L, "1台柜机+1台挂机"));
        map.put("4134430665599", new ZmnProductMapping(10428, 0, 594924756297L, 4134430665599L, "1台柜机+2台挂机"));
        map.put("4134430665597", new ZmnProductMapping(10471, 0, 594924756297L, 4134430665597L, "1台柜机+3台挂机"));
        PRODUCT_ID_MAP.put("594924756297", map);
        // 套餐清洗-冰箱+洗衣机
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11137, 17500, 595154733368L, 0L, "1台冰箱+1台洗衣机"));
        PRODUCT_ID_MAP.put("595154733368", map);
        // 套餐清洗-油烟机+洗衣机
        map = new HashMap<>();
        map.put("4304052115949", new ZmnProductMapping(11138, 0, 595507979480L, 4304052115949L, "1台油烟机（半拆）+1台滚筒洗衣机"));
        map.put("4304052115951", new ZmnProductMapping(10473, 0, 595507979480L, 4304052115951L, "1台油烟机（半拆）+1台波轮洗衣机"));
        map.put("4304052115950", new ZmnProductMapping(10473, 0, 595507979480L, 4304052115950L, "1台油烟机（全拆）+1台滚筒洗衣机"));
        map.put("4304052115948", new ZmnProductMapping(10473, 0, 595507979480L, 4304052115948L, "1台油烟机（全拆）+1台波轮洗衣机"));
        PRODUCT_ID_MAP.put("595507979480", map);
        // 套餐清洗-油烟机+燃气灶
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10472, 0, 595157277999L, 0L, "1台油烟机（半拆）+1台燃气灶"));
        PRODUCT_ID_MAP.put("595157277999", map);
        // 套餐清洗-空调挂机+热水器
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11127, 0, 594928704332L, 0L, "1台空调挂机+1台热水器（不拆洗）"));
        PRODUCT_ID_MAP.put("594928704332", map);
        // 套餐清洗-空调挂机+油烟机
        map = new HashMap<>();
        map.put("4131299548591", new ZmnProductMapping(11129, 0, 595330478425L, 4131299548591L, "1台空调挂机+1台油烟机（半拆洗）"));
        map.put("4131299548592", new ZmnProductMapping(11244, 0, 595330478425L, 4131299548592L, "1台空调挂机+1台油烟机（全拆洗）"));
        PRODUCT_ID_MAP.put("595330478425", map);
        // 套餐清洗-空调柜机+油烟机
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11244, 0, 595510603058L, 0L, "1台空调柜机+1台油烟机（半拆洗）"));
        PRODUCT_ID_MAP.put("595510603058", map);
        // 套餐清洗-空调挂机+洗衣机
        map = new HashMap<>();
        map.put("4131306972344", new ZmnProductMapping(10010, 0, 594929412617L, 4131306972344L, "1台空调挂机+1台洗衣机（全拆洗）"));
        map.put("4131306972345", new ZmnProductMapping(11132, 0, 594929412617L, 4131306972345L, "1台空调挂机+1台洗衣机（不拆洗）"));
        PRODUCT_ID_MAP.put("594929412617", map);
        // 套餐清洗-油烟机+冰箱
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10427, 0, 594930420361L, 0L, "1台冰箱+1台油烟机（全拆洗）"));
        PRODUCT_ID_MAP.put("594930420361", map);
        // 套餐清洗-油烟机+微波炉
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10432, 0, 618108405093L, 0L, "1台微波炉+1台油烟机（半拆洗）"));
        PRODUCT_ID_MAP.put("618108405093", map);
        // 套餐清洗-油烟机+热水器
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11141, 0, 618107933109L, 0L, "1台热水器+1台油烟机（半拆洗）"));
        PRODUCT_ID_MAP.put("618107933109", map);
        // 套餐清洗-油烟机+消毒柜
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10061, 0, 594930704912L, 0L, "1台消毒柜+1台油烟机（半拆洗）"));
        PRODUCT_ID_MAP.put("594930704912", map);
        // 套餐清洗-大家电任意三件组合
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10474, 0, 594931052701L, 0L,
                "油烟机（半拆）、冰箱、洗衣机（深度清洗）、空调挂机、热水器（不拆洗）、燃气灶任意三件组合"));
        PRODUCT_ID_MAP.put("594931052701", map);
        // 套餐清洗-大家电任意三件组合
        map = new HashMap<>();
        map.put("4306604840348", new ZmnProductMapping(10010, 0, 611829509531L, 4306604840348L, "空调清洗【赠高温消毒】"));
        map.put("4306604840351", new ZmnProductMapping(11238, 0, 611829509531L, 4306604840351L, "冰箱清洗【赠高温消毒】"));
        map.put("4306604840346", new ZmnProductMapping(10036, 0, 611829509531L, 4306604840346L, "洗衣机清洗【赠高温消毒】"));
        map.put("4306604840344", new ZmnProductMapping(10062, 0, 611829509531L, 4306604840344L, "热水器清洗【赠高温消毒】"));
        map.put("4306604840349", new ZmnProductMapping(10076, 0, 611829509531L, 4306604840349L, "油烟机清洗【赠高温消毒】 "));
        PRODUCT_ID_MAP.put("611829509531", map);
        // 套餐清洗-新增产品 2020.07.29 by lhl
        map = new HashMap<>();
        map.put("4417438549281", new ZmnProductMapping(11617, 0, 624509407263L, 4417438549281L, "油烟机、洗衣机、热水器、冰箱。任洗2件（半拆）"));
        map.put("4417438549282", new ZmnProductMapping(11618, 0, 624509407263L, 4417438549282L, "油烟机、洗衣机、热水器、冰箱。任洗3件（半拆）"));
        map.put("4417438549283", new ZmnProductMapping(11619, 0, 624509407263L, 4417438549283L, "油烟机、洗衣机、热水器、冰箱。任洗4件（半拆）"));
        map.put("4417438549284", new ZmnProductMapping(11620, 0, 624509407263L, 4417438549284L, "油烟机、洗衣机、热水器、冰箱。任洗2件（全拆，全拆清洗只涉及油烟机和波轮洗衣机）"));
        map.put("4417438549285", new ZmnProductMapping(11621, 0, 624509407263L, 4417438549285L, "油烟机、洗衣机、热水器、冰箱。任洗3件（全拆清洗只涉及油烟机和波轮洗衣机）"));
        map.put("4417438549286", new ZmnProductMapping(11622, 0, 624509407263L, 4417438549286L, "油烟机、洗衣机、热水器、冰箱。任洗4件（全拆清洗只涉及油烟机和波轮洗衣机）"));
        PRODUCT_ID_MAP.put("624509407263", map);
        // 中央空调
        map = new HashMap<>();
        map.put("4501139966100", new ZmnProductMapping(10012, 7000,  614998178556L, 4501139966100L, "中央空调风口清洗【单出风口】"));
        map.put("4501139966098", new ZmnProductMapping(11274, 27000, 614998178556L, 4501139966098L, "中央空调4组风口清洗"));
        map.put("4501139966099", new ZmnProductMapping(11229, 33000, 614998178556L, 4501139966099L, "中央空调5组风口清洗"));
        PRODUCT_ID_MAP.put("614998178556", map);
    }

    /* 淘宝产品映射关系初始化 - 维修 */
    static {
        Map<String, ZmnProductMapping> map = null;

        // 空调维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11815, 0, 588016463774L, 0L, "空调维修检测"));
        PRODUCT_ID_MAP.put("588016463774", map);
        // 电视机维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11810, 0, 588003499014L, 0L, "电视机维修检测"));
        PRODUCT_ID_MAP.put("588003499014", map);
        // 热水器维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11811, 0, 587722533725L, 0L, "热水器维修检测"));
        PRODUCT_ID_MAP.put("587722533725", map);
        // 油烟机维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11813, 0, 587505384850L, 0L, "油烟机维修检测"));
        PRODUCT_ID_MAP.put("587505384850", map);
        // 冰箱维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10271, 0, 588016415261L, 0L, "冰箱维修检测"));
        map.put("4474107578075", new ZmnProductMapping(10271, 0, 588016415261L, 4474107578075L, "冰箱维修检测"));
        PRODUCT_ID_MAP.put("588016415261", map);
        // 洗衣机维修检测
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11814, 0, 587722469606L, 0L, "洗衣机维修检测"));
        map.put("4477359623102", new ZmnProductMapping(11814, 0, 587722469606L, 4477359623102L, "洗衣机维修检测"));
        PRODUCT_ID_MAP.put("587722469606", map);
    }

    /* 淘宝产品映射关系初始化 - 安装 */
    static {
        Map<String, ZmnProductMapping> map = null;

        // 电视安装-电视壁挂式安装
        map = new HashMap<>();
        map.put("4129765601876", new ZmnProductMapping(10706, 8500, 594929756624L, 4129765601876L, "电视壁挂式安装55英寸以内"));
        map.put("4129765601877", new ZmnProductMapping(10706, 14200, 594929756624L, 4129765601877L, "电视壁挂式安装56—75英寸之间"));
        map.put("4129765601878", new ZmnProductMapping(10706, 23200, 594929756624L, 4129765601878L, "电视壁挂式安装75英寸以上"));
        PRODUCT_ID_MAP.put("594929756624", map);
        // 电视安装-电视座装
        map = new HashMap<>();
        map.put("4129773345331", new ZmnProductMapping(10706, 4000, 595511451589L, 4129773345331L, "电视座装56英寸以内"));
        map.put("0", new ZmnProductMapping(10706, 5700, 595511451589L, 0L, "电视座装56—76英寸之间"));
        map.put("0", new ZmnProductMapping(10706, 7500, 595511451589L, 0L, "电视座装76英寸以上"));
        PRODUCT_ID_MAP.put("595511451589", map);
        // 热水器安装-热水器安装
        map = new HashMap<>();
        map.put("4129778125360", new ZmnProductMapping(10595, 6500, 595332954473L, 4129778125360L, "即热式热水器安装"));
        map.put("4129778125361", new ZmnProductMapping(10065, 6500, 595332954473L, 4129778125361L, "燃气热水器安装"));
        map.put("4129778125362", new ZmnProductMapping(10063, 6500, 595332954473L, 4129778125362L, "电热水器安装"));
        PRODUCT_ID_MAP.put("595332954473", map);
        // 空调安装-空调安装
        map = new HashMap<>();
        map.put("4528745002196", new ZmnProductMapping(10014, 15900, 618076106327L, 4528745002196L, "空调安装服务P≤1.5P"));
        map.put("4528745002197", new ZmnProductMapping(10016, 23200, 618076106327L, 4528745002197L, "空调安装服务1.5<P≤3P"));
        map.put("4528745002198", new ZmnProductMapping(10019, 31500, 618076106327L, 4528745002198L, "空调安装服务3<P≤5P"));
        PRODUCT_ID_MAP.put("618076106327", map);
        // 洗衣机安装-洗衣机安装
        map = new HashMap<>();
        map.put("4126628676925", new ZmnProductMapping(10039, 3700, 594931656824L, 4126628676925L, "波轮洗衣机安装"));
        map.put("4126628676926", new ZmnProductMapping(10040, 4500, 594931656824L, 4126628676926L, "滚筒洗衣机安装"));
        PRODUCT_ID_MAP.put("594931656824", map);
        // 油烟机安装-油烟机安装
        map = new HashMap<>();
        map.put("594932224568", new ZmnProductMapping(10078, 6500, 594932224568L, 594932224568L, "油烟机安装"));
        PRODUCT_ID_MAP.put("594932224568", map);
        // 燃气灶安装-燃气灶安装
        map = new HashMap<>();
        map.put("595334570584", new ZmnProductMapping(10288, 4500, 595334570584L, 595334570584L, "燃气灶安装"));
        PRODUCT_ID_MAP.put("595334570584", map);
        // 电热水龙头安装-电热水龙头安装
        map = new HashMap<>();
        map.put("595513971526", new ZmnProductMapping(11937, 3900, 595513971526L, 595513971526L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("595513971526", map);
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11937, 3900, 602021909569L, 0L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("602021909569", map);
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11937, 3900, 603211627112L, 0L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("603211627112", map);
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11937, 3900, 615852298246L, 0L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("615852298246", map);
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11937, 3900, 604451627200L, 0L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("604451627200", map);
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11937, 3900, 601022933872L, 0L, "电热水龙头安装"));
        PRODUCT_ID_MAP.put("601022933872", map);
        /*
        // 考勤机安装-考勤机安装
        map = new HashMap<>();
        map.put("595334730924", new ZmnProductMapping(0, 5200, 595334730924L, 595334730924L, "考勤机安装"));
        PRODUCT_ID_MAP.put("595334730924", map);
        // 健身器材/按摩椅安装-按摩椅安装
        map = new HashMap<>();
        map.put("4296665486165", new ZmnProductMapping(0, 11000, 595335270490L, 4296665486165L, "按摩椅-150公斤以上需议价"));
        map.put("4296665486166", new ZmnProductMapping(0, 6500, 595335270490L, 4296665486166L, "跑步机/椭圆机安装（重量≤100KG）"));
        map.put("4296665486167", new ZmnProductMapping(0, 9500, 595335270490L, 4296665486167L, "跑步机/椭圆机安装（重量＞100KG）"));
        PRODUCT_ID_MAP.put("595335270490", map);
        // 健身器材/按摩椅安装-跑步机/椭圆机安装(动感单车)
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(0, 11000, 595335270490L, 0L, "动感单车/健身车"));
        PRODUCT_ID_MAP.put("594933112933", map);
        // 投影幕布安装-投影幕布安装
        map = new HashMap<>();
        map.put("4129800117931", new ZmnProductMapping(0, 15000, 595163253100L, 4129800117931L, "投影仪吊装"));
        map.put("4129800117932", new ZmnProductMapping(0, 40000, 595163253100L, 4129800117932L, "座装激光机+软幕调试"));
        map.put("4129800117933", new ZmnProductMapping(0, 38000, 595163253100L, 4129800117933L, "座装激光机+硬幕"));
        map.put("4129800117934", new ZmnProductMapping(0, 12000, 595163253100L, 4129800117934L, "抗光幕布安装"));
        PRODUCT_ID_MAP.put("595163253100", map);
        */
        // 空调拆机-空调拆机
        map = new HashMap<>();
        map.put("4173325967871", new ZmnProductMapping(10014, 12700, 587943510426L, 4173325967871L, "空调拆机服务P≤1.5P"));
        map.put("4173325967872", new ZmnProductMapping(10016, 15500, 587943510426L, 4173325967872L, "空调拆机服务1.5<P≤3P"));
        map.put("4173325967873", new ZmnProductMapping(10019, 20500, 587943510426L, 4173325967873L, "空调拆机服务3<P≤5P"));
        PRODUCT_ID_MAP.put("587943510426", map);
        // 热水器拆机-热水器拆机
        map = new HashMap<>();
        map.put("4004575909578", new ZmnProductMapping(10065, 4500, 587806033491L, 4004575909578L, "燃气热水器拆机"));
        map.put("4004575909575", new ZmnProductMapping(10063, 4500, 587806033491L, 4004575909575L, "电热水器拆机"));
        PRODUCT_ID_MAP.put("587806033491", map);
        // 油烟机拆机-油烟机拆机
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10078, 4500, 595511563938L, 0L, "油烟机拆机"));
        PRODUCT_ID_MAP.put("595511563938", map);
        // 油烟机拆机-燃气灶拆机
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10288, 3500, 595333146689L, 0L, "燃气灶拆机"));
        PRODUCT_ID_MAP.put("595333146689", map);
        // 空调移机-空调移机
        map = new HashMap<>();
        map.put("4126585572490", new ZmnProductMapping(10014, 23000, 594928820128L, 4126585572490L, "空调拆机+安装服务P≤1.5P（同址）"));
        map.put("4126585572491", new ZmnProductMapping(10014, 35500, 594928820128L, 4126585572491L, "空调拆机+安装服务P≤1.5P（不同址）"));
        map.put("4126585572492", new ZmnProductMapping(10016, 32000, 594928820128L, 4126585572492L, "空调拆机+安装服务1.5<P≤3P（同址）"));
        map.put("4126585572493", new ZmnProductMapping(10016, 45500, 594928820128L, 4126585572493L, "空调拆机+安装服务1.5<P≤3P（不同址）"));
        map.put("4126585572494", new ZmnProductMapping(10019, 42000, 594928820128L, 4126585572494L, "空调拆机+安装服务3<P≤5P（同址）"));
        map.put("4126585572495", new ZmnProductMapping(10019, 54500, 594928820128L, 4126585572495L, "空调拆机+安装服务3<P≤6P（不同址）"));
        PRODUCT_ID_MAP.put("594928820128", map);
        // 热水器移机-热水器移机
        map = new HashMap<>();
        map.put("4361480505319", new ZmnProductMapping(10065, 9500 , 617524104036L, 4361480505319L, "燃气热水器拆机+安装（同址）"));
        map.put("4361480505320", new ZmnProductMapping(10065, 22000, 617524104036L, 4361480505320L, "燃气热水器拆机+安装（不同址）"));
        map.put("4361480505321", new ZmnProductMapping(10063, 9500 , 617524104036L, 4361480505321L, "电热水器拆机+安装（同址）"));
        map.put("4361480505322", new ZmnProductMapping(10063, 22000, 617524104036L, 4361480505322L, "电热水器拆机+安装（不同址）"));
        PRODUCT_ID_MAP.put("617524104036", map);
        // 油烟机移机-油烟机移机
        map = new HashMap<>();
        map.put("4129761381961", new ZmnProductMapping(10078, 9500 , 595510563630L, 4129761381961L, "油烟机拆机+安装（同址）"));
        map.put("4129761381962", new ZmnProductMapping(10078, 22000, 595510563630L, 4129761381962L, "油烟机拆机+安装（不同址）"));
        PRODUCT_ID_MAP.put("595510563630", map);
        // 燃气灶移机-燃气灶移机
        map = new HashMap<>();
        map.put("4365200025164", new ZmnProductMapping(10288, 6500 , 618626031488L, 4365200025164L, "燃气灶拆机+安装（同址）"));
        map.put("4365200025165", new ZmnProductMapping(10288, 22000, 618626031488L, 4365200025165L, "燃气灶拆机+安装（不同址）"));
        PRODUCT_ID_MAP.put("618626031488", map);
        // 食物垃圾处理机-厨房下水处理器安装调试
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10700, 8500, 617817525169L, 0L, "厨房下水处理器安装调试"));
        PRODUCT_ID_MAP.put("617817525169", map);
        // 超滤机安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10669, 8550, 579652384197L, 0L, "超滤机安装"));
        PRODUCT_ID_MAP.put("579652384197", map);
        // 净饮机安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11231, 9500, 579653216475L, 0L, "净饮机安装"));
        PRODUCT_ID_MAP.put("579653216475", map);
        // 纯水机安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10668, 8900, 579834397638L, 0L, "纯水机安装"));
        PRODUCT_ID_MAP.put("579834397638", map);
        // 管线机安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10671, 8550, 579834885045L, 0L, "管线机安装"));
        PRODUCT_ID_MAP.put("579834885045", map);
        // 净水伴侣安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11232,  4750, 579835365598L, 0L, "净水伴侣安装"));
        PRODUCT_ID_MAP.put("579835365598", map);
        // 软水机安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10676, 28500, 579835493983L, 0L, "软水机安装"));
        PRODUCT_ID_MAP.put("579835493983", map);
        // 前置过滤器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10674, 9500, 617817237921L, 0L, "前置过滤器安装"));
        PRODUCT_ID_MAP.put("617817237921", map);
        // 通用式滤芯单次保养
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(11233,  4500, 579963214600L, 0L, "通用式滤芯单次保养"));
        PRODUCT_ID_MAP.put("579963214600", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 620502190874L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("620502190874", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 544372112383L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("544372112383", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 563452011830L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("563452011830", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 579834397638L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("579834397638", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 601590884064L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("601590884064", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 619434008272L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("619434008272", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 604220317866L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("604220317866", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 42127174734L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("42127174734", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 527096168729L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("527096168729", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 555607403126L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("555607403126", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 536951741439L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("536951741439", map);
        // 净水器安装
        map = new HashMap<>();
        map.put("0", new ZmnProductMapping(10116,  4500, 633294002418L, 0L, "净水器安装"));
        PRODUCT_ID_MAP.put("633294002418", map);
    }

    static {
        Map<String, ZmnProductMapping> map = null;
        // 管道疏通
        map = new HashMap<>();
        map.put("4329548428328", new ZmnProductMapping(10151,  4500, 614735140006L, 4329548428328L, "普通疏通"));
        map.put("4329548428329", new ZmnProductMapping(10151,  4500, 614735140006L, 4329548428329L, "高难度疏通"));
        PRODUCT_ID_MAP.put("614735140006", map);
    }

    /**
     * 淘宝商品ID-淘宝SKUID-啄木鸟产品ID
     */
    public static final Map<String, Map<String, ZmnProductMapping>> PRODUCT_ID_MAP_NEW = new HashMap();

    /* 新增产品-数据初始化 */
    static {
        // 燃气灶移机-燃气灶移机
        Map<String, ZmnProductMapping> map = null;

        map = new HashMap<>();
        map.put("4404003471934", new ZmnProductMapping(10021, 10900, 588016415261L, 4404003471934L, "冰箱简单维修一口价"));
        map.put("4404003471935", new ZmnProductMapping(10021, 18000, 588016415261L, 4404003471935L, "复杂维修一口价（≤200L）"));
        map.put("4239187576869", new ZmnProductMapping(10022, 22500, 588016415261L, 4239187576869L, "复杂维修一口价（201L-300L）"));
        map.put("4239187576870", new ZmnProductMapping(10023, 36200, 588016415261L, 4239187576870L, "复杂维修一口价（301L-400L）"));
        map.put("4239187576867", new ZmnProductMapping(10024, 45300, 588016415261L, 4239187576867L, "复杂维修一口价（401L-500L）"));
        map.put("4239187576868", new ZmnProductMapping(10025, 54400, 588016415261L, 4239187576868L, "复杂维修一口价（501L-600L）"));
        PRODUCT_ID_MAP_NEW.put("588016415261", map);

        map = new HashMap<>();
        map.put("4235148261508", new ZmnProductMapping(10547,  9100, 587722469606L, 4235148261508L, "洗衣机简单维修一口价"));
        map.put("4235148261509", new ZmnProductMapping(10547, 17100, 587722469606L, 4235148261509L, "波轮全自动（5kg及以下）复杂维修一口价"));
        map.put("4413027947557", new ZmnProductMapping(10548, 18000, 587722469606L, 4413027947557L, "波轮全自动（5.1kg-10kg）复杂维修一口价"));
        map.put("4413027947560", new ZmnProductMapping(10541, 24400, 587722469606L, 4413027947560L, "滚筒（5kg及以下）复杂维修一口价"));
        map.put("4413027947553", new ZmnProductMapping(10542, 26200, 587722469606L, 4413027947553L, "滚筒（5.1kg-10kg）复杂维修一口价"));
        map.put("4413027947554", new ZmnProductMapping(10032, 12500, 587722469606L, 4413027947554L, "波轮半自动复杂维修一口价"));
        map.put("4413027947559", new ZmnProductMapping(10551, 17100, 587722469606L, 4413027947559L, "烘干一体（5kg及以下）复杂维修一口价"));
        map.put("4413027947558", new ZmnProductMapping(10552, 33500, 587722469606L, 4413027947558L, "烘干一体（5.1kg-10kg）复杂维修一口价"));
        map.put("4413027947555", new ZmnProductMapping(10554, 17100, 587722469606L, 4413027947555L, "壁挂式复杂维修一口价"));
        map.put("4413027947556", new ZmnProductMapping(10550, 17100, 587722469606L, 4413027947556L, "迷你洗衣机复杂维修一口价"));
        PRODUCT_ID_MAP_NEW.put("587722469606", map);

        map = new HashMap<>();
        map.put("4235148577155", new ZmnProductMapping(10073,  9100, 587505384850L, 4235148577155L, "油烟机简单维修一口价"));
        map.put("4235148577156", new ZmnProductMapping(10073, 22500, 587505384850L, 4235148577156L, "普通油烟机复杂维修一口价"));
        map.put("4409986146529", new ZmnProductMapping(10622, 18000, 587505384850L, 4409986146529L, "中式油烟机（排风量14(m3/min)及以下）复杂维修一口价"));
        map.put("4409986146531", new ZmnProductMapping(10623, 22500, 587505384850L, 4409986146531L, "中式油烟机（排风量14(m3/min)以上）复杂维修一口价"));
        map.put("4409986146527", new ZmnProductMapping(10624, 22500, 587505384850L, 4409986146527L, "欧式油烟机（排风量14(m3/min)及以下）复杂维修一口价"));
        map.put("4409986146528", new ZmnProductMapping(10625, 26200, 587505384850L, 4409986146528L, "欧式油烟机（排风量14(m3/min)以上）复杂维修一口价"));
        map.put("4409986146530", new ZmnProductMapping(10074, 32700, 587505384850L, 4409986146530L, "集成灶油烟机复杂维修一口价"));
        map.put("4477349759007", new ZmnProductMapping(11813, 32700, 587505384850L, 4477349759007L, "油烟机维修检测"));
        PRODUCT_ID_MAP_NEW.put("587505384850", map);

        map = new HashMap<>();
        map.put("4405372959634", new ZmnProductMapping(10598,  9100, 587722533725L, 4405372959634L, "电/燃气/太阳能/即热式热水器简单维修一口价"));
        map.put("4405372959635", new ZmnProductMapping(10598, 18000, 587722533725L, 4405372959635L, "电热水器（<60L）复杂维修一口价"));
        map.put("4242734493798", new ZmnProductMapping(10599, 19800, 587722533725L, 4242734493798L, "电热水器（60-100L）复杂维修一口价"));
        map.put("4242734493802", new ZmnProductMapping(10600, 26200, 587722533725L, 4242734493802L, "电热水器（101-200L）复杂维修一口价"));
        map.put("4242734493789", new ZmnProductMapping(10601, 29100, 587722533725L, 4242734493789L, "电热水器（201-300L）复杂维修一口价"));
        map.put("4242734493794", new ZmnProductMapping(10602, 43600, 587722533725L, 4242734493794L, "电热水器（301-500L）复杂维修一口价"));
        map.put("4242734493799", new ZmnProductMapping(10752, 20900, 587722533725L, 4242734493799L, "燃气热水器（≤8L）复杂维修一口价"));
        map.put("4242734493795", new ZmnProductMapping(10603, 25500, 587722533725L, 4242734493795L, "燃气热水器（8.1-12L）复杂维修一口价"));
        map.put("4242734493796", new ZmnProductMapping(10604, 29100, 587722533725L, 4242734493796L, "燃气热水器（12.1-16L）复杂维修一口价"));
        map.put("4242734493792", new ZmnProductMapping(10715, 34500, 587722533725L, 4242734493792L, "燃气热水器（16.1-20L）复杂维修一口价"));
        map.put("4242734493797", new ZmnProductMapping(10753, 18000, 587722533725L, 4242734493797L, "太阳能热水器（≤60L）复杂维修一口价"));
        map.put("4242734493801", new ZmnProductMapping(10717, 23600, 587722533725L, 4242734493801L, "太阳能热水器（61-100L）复杂维修一口价"));
        map.put("4242734493788", new ZmnProductMapping(10718, 29100, 587722533725L, 4242734493788L, "太阳能热水器（101-200L）复杂维修一口价"));
        map.put("4242734493786", new ZmnProductMapping(10719, 32700, 587722533725L, 4242734493786L, "太阳能热水器（201-300L）复杂维修一口价"));
        map.put("4242734493790", new ZmnProductMapping(10754, 13600, 587722533725L, 4242734493790L, "壁挂炉简单维修一口价"));
        map.put("4242734493782", new ZmnProductMapping(10754, 36200, 587722533725L, 4242734493782L, "壁挂炉（≤16L）复杂维修一口价"));
        map.put("4242734493791", new ZmnProductMapping(11811, 43600, 587722533725L, 4242734493791L, "热水器维修"));
        map.put("4242734493783", new ZmnProductMapping(10722, 59100, 587722533725L, 4242734493783L, "壁挂炉（20.1-30L）复杂维修一口价"));
        map.put("4242734493781", new ZmnProductMapping(10058, 10900, 587722533725L, 4242734493781L, "空气能热水器简单维修一口价"));
        map.put("4242734493787", new ZmnProductMapping(10058, 26200, 587722533725L, 4242734493787L, "空气能热水器（1-1.5P）复杂维修一口价"));
        map.put("4242734493785", new ZmnProductMapping(10059, 44400, 587722533725L, 4242734493785L, "空气能热水器（2-3P）复杂维修一口价"));
        map.put("4242734493784", new ZmnProductMapping(10755, 17100, 587722533725L, 4242734493784L, "即热式（≤4000瓦）复杂维修一口价"));
        map.put("4242734493800", new ZmnProductMapping(10724, 23600, 587722533725L, 4242734493800L, "即热式（4001-6000瓦）复杂维修一口价"));
        map.put("4242734493793", new ZmnProductMapping(10725, 31800, 587722533725L, 4242734493793L, "即热式（6001-8000瓦）复杂维修一口价"));
        PRODUCT_ID_MAP_NEW.put("587722533725", map);

        map = new HashMap<>();
        map.put("4235147333687", new ZmnProductMapping(10044, 10900, 588003499014L, 4235147333687L, "电视机简单维修一口价"));
        map.put("4235147333688", new ZmnProductMapping(10044, 18000, 588003499014L, 4235147333688L, "复杂维修一口价（≤32吋）"));
        map.put("4242746341156", new ZmnProductMapping(10045, 33500, 588003499014L, 4242746341156L, "复杂维修一口价（33-41吋）"));
        map.put("4242746341157", new ZmnProductMapping(10046, 36200, 588003499014L, 4242746341157L, "复杂维修一口价（42-54吋）"));
        map.put("4242746341155", new ZmnProductMapping(10047, 48000, 588003499014L, 4242746341155L, "复杂维修一口价（55-65吋）"));
        map.put("4477349759006", new ZmnProductMapping(11810, 48000, 588003499014L, 4477349759006L, "电视机维修"));
        PRODUCT_ID_MAP_NEW.put("588003499014", map);

        map = new HashMap<>();
        map.put("4405370299805", new ZmnProductMapping(10001, 10900, 588016463774L, 4405370299805L, "空调简单维修一口价"));
        map.put("4405370299806", new ZmnProductMapping(10001, 22500, 588016463774L, 4405370299806L, "定频挂机（1-1.5P）复杂维修一口价"));
        map.put("4239182144790", new ZmnProductMapping(10003, 27100, 588016463774L, 4239182144790L, "定频挂机（2-3P）复杂维修一口价"));
        map.put("4239182144794", new ZmnProductMapping(10004, 26200, 588016463774L, 4239182144794L, "变频挂机（1-1.5P）复杂维修一口价"));
        map.put("4239182144784", new ZmnProductMapping(10005, 44400, 588016463774L, 4239182144784L, "变频挂机（2-3P）复杂维修一口价"));
        map.put("4239182144786", new ZmnProductMapping(10006, 27100, 588016463774L, 4239182144786L, "定频柜机（2-3P）复杂维修一口价"));
        map.put("4239182144792", new ZmnProductMapping(10476, 43600, 588016463774L, 4239182144792L, "定频柜机（4P)复杂维修一口价"));
        map.put("4239182144791", new ZmnProductMapping(10477, 43600, 588016463774L, 4239182144791L, "定频柜机（5P)复杂维修一口价"));
        map.put("4239182144787", new ZmnProductMapping(10007, 44400, 588016463774L, 4239182144787L, "变频柜机（2-3P）复杂维修一口价"));
        map.put("4239182144788", new ZmnProductMapping(10478, 62500, 588016463774L, 4239182144788L, "变频柜机（4P)复杂维修一口价"));
        map.put("4239182144785", new ZmnProductMapping(10479, 86400, 588016463774L, 4239182144785L, "变频柜机（5P)复杂维修一口价"));
        map.put("4239182144782", new ZmnProductMapping(10761, 29800, 588016463774L, 4239182144782L, "风管机（1-1.5P）复杂维修一口价"));
        map.put("4239182144789", new ZmnProductMapping(10008, 44400, 588016463774L, 4239182144789L, "风管机（2-3P）复杂维修一口价"));
        map.put("4239182144793", new ZmnProductMapping(10761, 29800, 588016463774L, 4239182144793L, "天井机(1-1.5P)复杂维修一口价"));
        map.put("4239182144783", new ZmnProductMapping(10008, 44400, 588016463774L, 4239182144783L, "天井机（2-3P）复杂维修一口价"));
        map.put("4302895580172", new ZmnProductMapping(11815, 44400, 588016463774L, 4302895580172L, "空调维修检测"));
        PRODUCT_ID_MAP_NEW.put("588016463774", map);

    }

    /**
     * 获取啄木鸟产品映射关系对象
     * @param auctionId
     * @param auctionSkuid
     * @return
     * @throws OmsBaseException
     */
    public static int getZmnProductId(Long auctionId, Long auctionSkuid, Integer servCategId) {
        /*String auctionIdStr = String.valueOf(Optional.ofNullable(auctionId).orElse(0L));
        String auctionSkuidStr = String.valueOf(Optional.ofNullable(auctionSkuid).orElse(0L));

        ZmnProductMapping zmnProductMapping = null;

        // 老产品查询
        Map<String, ZmnProductMapping> map = PRODUCT_ID_MAP.get(auctionIdStr);
        if (map != null) {
            zmnProductMapping = map.get(auctionSkuidStr);

            // 修正 skuId=0 或者 skuId=auctionId 导致查不到产品的情况
            if (zmnProductMapping == null && "0".equals(auctionSkuidStr)) {
                zmnProductMapping = map.get(auctionIdStr);
            }
            if (zmnProductMapping == null && Objects.equals(auctionIdStr, auctionSkuidStr)) {
                zmnProductMapping = map.get("0");
            }
        }

        if (zmnProductMapping != null) {
            return ProductIdUtil.getNewProductId(zmnProductMapping.getZmnProductId());
        }

        // 新产品查询
        map = PRODUCT_ID_MAP_NEW.get(auctionIdStr);
        if (map != null) {
            zmnProductMapping = map.get(auctionSkuidStr);
            if (zmnProductMapping != null) {
                return zmnProductMapping.getZmnProductId();
            }
        }*/

        //无法识别产品时，使用默认产品id，保证正常下单
        return getDefaultZmnProductId(servCategId);
    }

    public static int getChannelIdBySellerId(Long sellerId) {
        if (sellerId != null) {
            String sellerIdStr = sellerId.toString();
            if ("2823405886".equals(sellerIdStr)    // 欧派官方旗舰店
                    || "3979096726".equals(sellerIdStr)) {  // 欧派厨电旗舰店
                return OrderConsts.CHANNEL_ID_TMALL_BIZ_OPPEIN;
            }
            else if ("2816776987".equals(sellerIdStr)) {    // 莱梅德电器旗舰店
                return OrderConsts.CHANNEL_ID_TMALL_BIZ_LAIMD;
            }
        }

        return OrderConsts.CHANNEL_ID_TMALL_BUSINESS;
    }

    // 判断是否是天猫B端订单
    public static boolean isTmallChannel(Integer channelId) {
        if (channelId == null) {
            return false;
        }

        int channelIdInt = channelId.intValue();
        if (channelIdInt == OrderConsts.CHANNEL_ID_TMALL_WYG
                || channelIdInt == OrderConsts.CHANNEL_ID_TMALL_PIPE
                || isTmallBizChannel(channelId)) {
            return true;
        }

        return false;
    }

    // 判断是否是天猫B端订单
    public static boolean isTmallBizChannel(Integer channelId) {
        if (channelId == null) {
            return false;
        }

        int channelIdInt = channelId.intValue();
        if (channelIdInt == OrderConsts.CHANNEL_ID_TMALL_BUSINESS
                || channelIdInt == OrderConsts.CHANNEL_ID_TMALL_BIZ_OPPEIN
                || channelIdInt == OrderConsts.CHANNEL_ID_TMALL_BIZ_LAIMD) {
            return true;
        }

        return false;
    }

    /**
     * 投诉问题对象
     */
    public static class RecourseQuestion {
        private String code;    // 问题编码
        private String text;    // 问题说明
        private String serviceType;    // 问题所属的服务类型

        public RecourseQuestion(String code, String text, String serviceType) {
            this.code = code;
            this.text = text;
            this.serviceType = serviceType;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String getServiceType() {
            return serviceType;
        }

        public void setServiceType(String serviceType) {
            this.serviceType = serviceType;
        }
    }

    /**
     * 啄木鸟与淘宝产品映射对象
     */
    public static class ZmnProductMapping {
        private int zmnProductId;   // 啄木鸟产品ID
        private int price;  // 价格
        private long spuid; // 淘宝产品ID
        private long skuid; // 淘宝产品SKUID
        private String serviceItemName; // 服务项目

        public ZmnProductMapping(int zmnProductId, int price, long spuid, long skuid, String serviceItemName) {
            this.zmnProductId = zmnProductId;
            this.price = price;
            this.spuid = spuid;
            this.skuid = skuid;
            this.serviceItemName = serviceItemName;
        }

        public int getZmnProductId() {
            return zmnProductId;
        }

        public void setZmnProductId(int zmnProductId) {
            this.zmnProductId = zmnProductId;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public long getSpuid() {
            return spuid;
        }

        public void setSpuid(long spuid) {
            this.spuid = spuid;
        }

        public long getSkuid() {
            return skuid;
        }

        public void setSkuid(long skuid) {
            this.skuid = skuid;
        }

        public String getServiceItemName() {
            return serviceItemName;
        }

        public void setServiceItemName(String serviceItemName) {
            this.serviceItemName = serviceItemName;
        }
    }

    /**
     * 无法识别产品时，使用默认产品id，保证正常下单
     * @param servCategId
     * @return
     */
    private static int getDefaultZmnProductId(Integer servCategId) {

        return Objects.equals(GlobalConsts.SERV_CATEG_CLEAN, servCategId)
                ? OrderConsts.CHANNEL_DISABLED_PRODUCT_ID_CLEAN
                : OrderConsts.CHANNEL_DISABLED_PRODUCT_ID;
    }
}
